import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  {
    path: '/',
    component: () => import( '../views/HomeView')
  },
  {
    path: '/about',
    component: () => import( '../views/AboutView.vue'),
    children:[
      {
        path: 'child1',
        component: () => import( '../child1'),
        children:[
          {
            path: 'child2',
            component: () => import( '../child2')
          },
        ]
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
